-
Notifications
You must be signed in to change notification settings - Fork 734
Document play argument validation #3079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devel
Are you sure you want to change the base?
Conversation
7bbe2ef
to
b8b7c44
Compare
b8b7c44
to
a633774
Compare
I could make this a snippet, and include it in the playbooks intro and any additional locations. Facts gathered at the play level (i.e. gather_facts: true) can be validated, so maybe https://github.com/ansible/ansible-documentation/blob/devel/docs/docsite/rst/playbook_guide/playbooks_vars_facts.rst could reference it even though the documentation is a little more general than that. A variety of variable sources can be validated, so https://github.com/ansible/ansible-documentation/blob/devel/docs/docsite/rst/playbook_guide/playbooks_variables.rst could reference it even though the documentation covers additional variable sources. ... anywhere else? None of the pages seems like a perfect fit, so any suggestions are welcome. |
Asking the hivemind for advice - https://forum.ansible.com/t/where-should-we-document-the-new-play-argspec/44588 :-) |
My initial suggestion is to not use snippets. Most contributors don't know how to use them and it makes it unsustainable over the long term. We have a hodgepodge of them now in the docs that we should actually remove. So far, where you have it documented in this PR makes sense to me and we could put links to this section from the other places you mention in your comments. But let's see if we get other ideas from the forum post. |
Hello Sandra [@samccann], |
@StSchnell When I used the word 'snippet', I just meant the organization of the documentation (https://github.com/ansible/ansible-documentation/tree/devel/docs/docsite/rst/shared_snippets), and nothing to do with the contents of the documentation. |
@samccann I grep for everything, so I'm just trying to figure out where people organically will look for documentation for this feature. I'd love to not reference it on multiple pages because then I really have to use grep to find what I'm looking for. If this is a fine location to document it, I'm happy with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@s-hertel 👋 Thanks for the patience as I've been trying to get round to reviewing this in a bit more detail. I'll add some more comments soon but wanted to provide my thoughts on where this info might fit.
After looking again, I think maybe somewhere between the "Interactive input: prompts" and "Using variables" sections.
I guess both prompts and arg validation are kind of related. And, like the "Module defaults" section, these docs are about a play-level keyword. So it keeps things together conceptually.
Adding some documentation for ansible/ansible#85763.
I'm not sure if the playbook introduction is the best place to document this. I'm guessing we might want to reference this feature on multiple pages.
The 'Specification Format' section is largely copied from the role argument specification documentation, but I removed fields that are strictly for documentation purposes (other than
description
) sinceansible-doc
doesn't do anything with this feature yet.